﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication.Admin
{
    public partial class Web : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["TaiKhoan"] != null)
            {
                lbtnphanquyen.Visible = false;
                lbnhanvien.Text = Session["TaiKhoan"].ToString();
                if (Session["TaiKhoan"].ToString() == "Admin")
                {
                    lbtnphanquyen.Visible = true;
                }
            }
            else
            {
                Response.Redirect("/Login.aspx");
            }
        }
        protected void btnlogout_Click(object sender, EventArgs e)
        {
            Session["TaiKhoan"] = null;
            Session["MANV"] = null;
            Response.Redirect("/Login.aspx");
           
        }

        protected void lbtnphanquyen_Click(object sender, EventArgs e)
        {
            Response.Redirect("PhanQuyen.aspx");
        }

    }
}